package com.binance.basedao.anotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OrderColumn {

    /** (Optional) The name of the ordering column.
     *  Defaults to the concatenation of the name of the
     *  referencing property or field; "_"; "ORDER".
     */
    String name() default "";

    /** (Optional) Whether the database column is nullable. */
    boolean nullable() default true;

    /**
     * (Optional) Whether the column is included in SQL INSERT statements
     * generated by the persistence provider.
     */
    boolean insertable() default true;

    /**
     * (Optional) Whether the column is included in SQL UPDATE statements
     * generated by the persistence provider.
     */
    boolean updatable() default true;

    /**
     * (Optional) The SQL fragment that is used when generating the DDL for the
     * column.  Defaults to generated SQL to create a column of the inferred type.
     */
    String columnDefinition() default "";
}
